
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>单位基本信息</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../../layui/css/layui.css" media="all">
<script src="../../../layui/layui.js" charset="utf-8"></script>
<script src="../../../js/angular.js" charset="utf-8"></script>
<script src="../../../layui/jquery-3.2.1.min.js" charset="utf-8"></script>
<script type="text/javascript" src="../gjjhbj/fy.js"></script>
<style>
.layui-form-label {
	text-align: right;
	width:130px;
}
.layui-form-item{
	height:30px;
	width:100%;
}
</style>


</head>
<body>
	<fieldset class="layui-elem-field layui-field-title"
		style="margin-top: 20px;">
		<legend>单位变更前基本信息</legend>
	</fieldset>
 <div class="layui-card">


	<form class="layui-form" action="" id="form1">
	
		<div class="layui-form-item" >
			<div class="layui-inline">
				<label class="layui-form-label">单位账号:</label>
				<div class="layui-input-inline">
					<input type="text" name="DWZH" id="DWZH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">单位性质:</label>
				<div class="layui-input-inline">
					<input type="text" name="DWXZ" id="DWXZ" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:40%">
				<label class="layui-form-label">单位名称:</label>
				<div class="layui-input-inline" style="width:70%">
					<input type="text" name="DWMC" id="DWMC" autocomplete="off" style="width:100%"
						class="layui-input">
				</div>
			</div>
			
		</div>

		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">开户时间:</label>
				<div class="layui-input-inline">
					<input type="text" name="KHSJ" id="KHSJ" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">单位设立日期:</label>
				<div class="layui-input-inline">
					<input type="text" name="DWSLRQ" id="DWSLRQ" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:40%">
				<label class="layui-form-label">单位地址:</label>
				<div class="layui-input-inline" style="width:70%">
					<input type="text" name="DWDZ" id="DWDZ" autocomplete="off"
						class="layui-input"  >   
				</div>
			</div>
			
		</div>

		<div class="layui-form-item" >
			<div class="layui-inline">
				<label class="layui-form-label">财务负责人:</label>
				<div class="layui-input-inline">
					<input type="text" name="CWFZR" id="CWFZR" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">组织机构代码:</label>
				<div class="layui-input-inline">
					<input type="text" name="ZZJGDM" ID="ZZJGDM" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">缴存情况:</label>
				<div class="layui-input-inline">
					<input type="text" name="JCQK" id="JCQK" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">单位缴存比例:</label>
				<div class="layui-input-inline">
					<input type="text" name="DWJCBL" id="DWJCBL" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">个人缴存比例:</label>
				<div class="layui-input-inline">
					<input type="text" name="GRJCBL" id="GRJCBL" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">开户银行:</label>
				<div class="layui-input-inline">
					<input type="text" name="KHYH" id="KHYH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			
			
			
		</div>

		<div class="layui-form-item">
			<div class="layui-inline">
			<label class="layui-form-label">单位电子信箱:</label>
			<div class="layui-input-inline">
				<input type="text" name="DWDZXX" id="DWDZXX" autocomplete="off"
					class="layui-input">
			</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">财务负责人电话:</label>
				<div class="layui-input-inline">
					<input type="text" name="CWFZRDH" id="CWFZRDH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">在职人数:</label>
				<div class="layui-input-inline">
					<input type="text" name="ZZRS" id="ZZRS" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">实缴人数:</label>
				<div class="layui-input-inline">
					<input type="text" name="SJRS" id="SJRS" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">单位法人代表姓名:</label>
				<div class="layui-input-inline">
					<input type="text" name="DWFRDBXM" id="DWFRDBXM" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			
			<div class="layui-inline">
				<label class="layui-form-label">账号:</label>
				<div class="layui-input-inline">
					<input type="text" name="ZHANGH" id="ZHANGH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">缴存银行:</label>
				<div class="layui-input-inline">
					<input type="text" name="JCYH" id="JCYH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">单位邮编:</label>
				<div class="layui-input-inline">
					<input type="text" name="DWYB" id="DWYB" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">电话:</label>
				<div class="layui-input-inline">
					<input type="text" name="TELEPHONE" id="TELEPHONE"
						autocomplete="off" class="layui-input">
				</div>
			</div>
			
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">单位发薪日:</label>
				<div class="layui-input-inline">
					<input type="text" name="DWFXR" id="DWFXR" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">经办人手机号码:</label>
				<div class="layui-input-inline">
					<input type="text" name="JBRSJHM" id="JBRSJHM" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>
	</form>
</div>
	<fieldset class="layui-elem-field layui-field-title"
		style="margin-top: 20px;">
		<legend>单位变更后信息</legend>
	</fieldset>
	<form class="layui-form" action="">
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">单位邮编:</label>
				<div class="layui-input-inline">
					<input type="text" name="BGHDWYB" id="BGHDWYB" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">单位法人代表姓名:</label>
				<div class="layui-input-inline">
					<input type="text" name="BGHFRDB" id="BGHFRDB"
						autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">电话:</label>
				<div class="layui-input-inline">
					<input type="text" name="BGHDH" id="BGHDH"
						autocomplete="off" class="layui-input">
				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">财务负责人:</label>
				<div class="layui-input-inline">
					<input type="text" name="BGHCFWZR" id="BGHCFWZR" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">财务负责电话:</label>
				<div class="layui-input-inline">
					<input type="text" name="BGHCWFZRDH" id="BGHCWFZRDH"
						autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">开户银行:</label>
				<div class="layui-input-inline">
					<input type="text" name="BGHKHYH" id="BGHKHYH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">账号:</label>
				<div class="layui-input-inline">
					<input type="text" name="BGHZH" id="BGHZH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">单位电子信箱:</label>
				<div class="layui-input-inline">
					<input type="text" name="BGHDWDZYX" id="BGHDWDZYX"
						autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">单位发薪日:</label>
				<div class="layui-input-inline">
					<input type="text" name="BGHDWFXR" id="BGHDWFXR" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">缴存银行:</label>
				<div class="layui-input-inline">
					<input type="text" name="BGHJCYH" id="BGHJCYH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">单位缴存比例:</label>
				<div class="layui-input-inline">
					<input type="text" name="BGHDWJCBL" id="BGHDWJCBL"
						autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">个人缴存比:</label>
				<div class="layui-input-inline">
					<input type="text" name="BGHGRJCBL" id="BGHGRJCBL"
						autocomplete="off" class="layui-input">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">经办人手机号:</label>
				<div class="layui-input-inline">
					<input type="text" name="BGHJBRSJH" id="BGHJBRSJH"
						autocomplete="off" class="layui-input">
				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-input-block">
				<input class="layui-btn" id="submit" style="width: 10%" value="提交申请">
				<button type="reset" style="width: 10%"  id="reset"
					class="layui-btn layui-btn-primary">重&nbsp;&nbsp;&nbsp;置</button>
			</div>
		</div>

	</form>
	<script>
		layui.use('element', function() {
			var $ = layui.jquery, element = layui.element;
		});
	</script>
	<script type="text/javascript">
		function getPath() {
			return 'http://' + location.host;
		}
	</script>
	<script type="text/javascript"
		src="../../../layui/lay/modules/layer.js"></script>
	<script type="text/javascript" src="../../../layui/layer.ext.js"></script>
	<script src="../../../layui/jquery-3.2.1.min.js" charset="utf-8"></script>
	<script type="text/javascript">
		$(function() {
		$("#submit").hide();
		
		$("#form1 input[type='text']").attr("readonly","readonly");
		$("#form1 input[type='text']").attr("style","border:none");
		$.ajax({
				url : getPath() + '/wsyyt/dwxxbgcontroller/test',
				method : 'post',
				dataType : 'JSON',
				success : function(result) {
					var data = result.data;
					if(data[0].BGHFRDB!=null&&data[0].BGHFRDB!=""){
					$("#submit").hide();
					$("#reset").hide();
					}
					else{
					$("#submit").show();
					}
						$.each(data[0], function(key, value) {
							$("#" + key).val(value || "");
						});
						layer.msg('提示：' + result.msg
						);
				}
			});
								
			$("#submit").click(
					function() {
					var bDWYB = $("#BGHDWYB").val();
						var bDWFRDBXM = $("#BGHFRDB").val();
						var bSJHM = $("#BGHDH").val();
						var bCWFZR = $("#BGHCFWZR").val();
						var bCWFZRDH = $("#BGHCWFZRDH").val();
						var bKHYH = $("#BGHKHYH").val();
						var bZH = $("#BGHZH").val();

						var bDWDZXX = $("#BGHDWDZYX").val();
						var bDWFXR = $("#BGHDWFXR").val();
						var bJBRSJHM = $("#BGHJBRSJH").val();

						var bJCYH = $("#BGHJCYH").val();
						var bDWJCBL = $("#BGHDWJCBL").val();
						var bGRJCBL = $("#BGHGRJCBL").val();
						//原信息
						var DWZH = $("#DWZH").val();
						var DWMC = $("#DWMC").val();
						var DWYB = $("#DWYB").val();
						var DWFRDBXM = $("#DWFRDBXM").val();
						var DH = $("#TELEPHONE").val();
						var CWFZR = $("#CWFZR").val();
						var CWFZRDH = $("#CWFZRDH").val();
						var KHYH = $("#KHYH").val();
						var ZH = $("#ZHANGH").val();
						var JCYH = $("#JCYH").val();
						var DWJCBL = $("#DWJCBL").val();
						var GRJCBL = $("#GRJCBL").val();
						var DWDZXX = $("#DWDZXX").val();
						var DWFXR = $("#DWFXR").val();
						var JBRSJHM = $("#JBRSJHM").val();
						if (bDWYB != "" && bDWYB != null && bDWFRDBXM != ""
								&& bDWFRDBXM != null && bSJHM != ""
								&& bSJHM != null && bCWFZR != ""
								&& bCWFZR != null && bCWFZRDH != null
								&& bCWFZRDH != "" && bKHYH != ""
								&& bKHYH != null && bZH != "" && bZH != null
								&& bDWDZXX != "" && bDWDZXX != null
								&& bDWFXR != "" && bDWFXR != null
								&& bJBRSJHM != "" && bJBRSJHM != null
								&& bJBRSJHM.length == 11 && bDWJCBL > 4
								&& bDWJCBL<13 && bGRJCBL>4 && bGRJCBL < 13) {
							$.ajax({
								url : getPath() + '/wsyyt/dwxxbgcontroller/bg',
								method : 'post',
								dataType : 'JSON',
								data : {
									'bGRJCBL' : bGRJCBL,
									'bDWJCBL' : bDWJCBL,
									'bJCYH' : bJCYH,
									'bDWYB' : bDWYB,
									'bDWFRDBXM' : bDWFRDBXM,
									'bSJHM' : bSJHM,
									'bCWFZR' : bCWFZR,
									'bCWFZRDH' : bCWFZRDH,
									'bKHYH' : bKHYH,
									'bZH' : bZH,
									'bDWDZXX' : bDWDZXX,
									'bDWFXR' : bDWFXR,
									'bJBRSJHM' : bJBRSJHM,
									'DWZH' : DWZH,
									'DWMC' : DWMC,
									'DWYB' : DWYB,
									'DWFRDBXM' : DWFRDBXM,
									'DH' : DH,
									'CWFZR' : CWFZR,
									'CWFZRDH' : CWFZRDH,
									'KHYH' : KHYH,
									'ZH' : ZH,
									'JCYH' : JCYH,
									'DWJCBL' : DWJCBL,
									'GRJCBL' : GRJCBL,
									'DWDZXX' : DWDZXX,
									'DWFXR' : DWFXR,
									'JBRSJHM' : JBRSJHM,
								},
								success : function(result) {
										layer.msg('提示：' + result.msg);
										location.reload();									
								}
							});
						} else if (bJBRSJHM.length != 11) {
							layer.alert("经办人手机号必须十一位！");
						} else if (bDWJCBL < 5) {
							layer.alert("单位缴存比例不能小于5");
						} else if (bDWJCBL > 13) {
							layer.alert("单位缴存比例不能大于13");
						} else if (bGRJCBL < 5) {
							layer.alert("个人缴存比例不能大于5");
						} else if (bGRJCBL > 13) {
							layer.alert("个人缴存比例不能大于13");
						} else {
							layer.alert("内容不可为空！");
						}
					});

			

			$("#cx").click(function() {
				table.reload('testReload', {
					url : getPath() + '/wsyyt/dwryxxcontroller/test',
					where : {
						'XM' : $("#YB").val(),
						'SFZH' : $("#SFZH").val(),
						'yj' : $("#yj").val(),
						'wj' : $("#wj").val(),
						'tj' : $("#tj").val()
					}
				//设定异步数据接的额外参数
				});
			});
		});

		/* 	var bDWYB=$("#DWYB1").val();
			var bDWFRDBXM=$("#DWFRDBXM1").val();
			var bSJHM=$("#TELEPHONE1").val();
			var bCWFZR=$("#CWFZR1").val();
			var bCWFZRDH=$("#CWFZRDH1").val();
			var bKHYH=$("#KHYH1").val();
			var bZH=$("#ZHANGH1").val();
			var bDWDZXX=$("#DWDZXX1").val();
			var bDWFXR=$("#DWFXR1").val();
			var bJBRSJHM=$("#JBRSJHM1").val();
			
			var bJCYH=$("#JCYH1").val();
			var bDWJCBL=$("#DWJCBL1").val();
			var bGRJCBL=$("#GRJCBL1").val();
			//原信息
			var DWZH=$("#DWZH").val();
			var DWMC=$("#DWMC").val();
			var DWYB=$("#DWYB").val();
			var DWFRDBXM=$("#DWFRDBXM").val();
			var DH=$("#DH").val();
			var CWFZR=$("#CWFZR").val();
			var CWFZRDH=$("#CWFZRDH").val();
			var KHYH=$("#KHYH").val();
			var ZH=$("#ZHANGH").val();
			var JCYH=$("#JCYH").val();
			var DWJCBL=$("#DWJCBL").val();
			var GRJCBL=$("#GRJCBL").val();
			var DWDZXX=$("#DWDZXX").val();
			var DWFXR=$("#DWFXR").val();
			var JBRSJHM=$("#JBRSJHM").val();
			$.ajax({
							url : getPath()+'/wsyyt/dwxxbgcontroller/bg',
							method : 'post',
							dataType : 'JSON',
							data: {'bGRJCBL':bGRJCBL,'bDWJCBL':bDWJCBL,'bJCYH':bJCYH,'bDWYB':bDWYB,'bDWFRDBXM':bDWFRDBXM,'bSJHM':bSJHM,'bCWFZR':bCWFZR,'bCWFZRDH':bCWFZRDH,'bKHYH':bKHYH,'bZH':bZH,'bDWDZXX':bDWDZXX,'bDWFXR':bDWFXR,'bJBRSJHM':bJBRSJHM,'DWZH':DWZH,'DWMC':DWMC,'DWYB':DWYB,'DWFRDBXM':DWFRDBXM,'DH':DH,'CWFZR':CWFZR,'CWFZRDH':CWFZRDH,'KHYH':KHYH,'ZH':ZH,'JCYH':JCYH,'DWJCBL':DWJCBL,'GRJCBL':GRJCBL,'DWDZXX':DWDZXX,'DWFXR':DWFXR,'JBRSJHM':JBRSJHM,},
							success : function(result) {
								var code = result.code;
								if(code==0){
										alert("变更成功");
									// window.location.href =getPath()+'/wsyyt/dwbjhjqccontroller/test1';
									  
								}else{				
										alert("变更失败");
									//window.location.href =getPath()+'/wsyyt/login/login.html';
									
								};
							}
						});	*/
	</script>
</body>
</html>